<%@page import="com.caresms.service.Keyword_MasterLocalServiceUtil"%>
<%@page import="com.caresms.service.persistence.Keyword_MasterFinderUtil"%>
<%@page import="com.caresms.model.Keyword_Master"%>
<%@page import="com.caresms.service.Category_MasterLocalServiceUtil"%>
<%@page import="com.caresms.model.Category_Master"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
<%@include file="/init.jsp" %>   



<html>
<head>

<title>Sms Keyword</title>
</head>
<body>
<portlet:actionURL name="keyAction" var="keyActionURL"></portlet:actionURL>
<aui:form name="Sms_key" id="Sms_key" action='<%=keyActionURL.toString() %>'>
<aui:layout>
<aui:column>

<aui:input name="Keyword" type="textarea" label="Sms Keyword">
<aui:validator name="required" errorMessage="this field requred"></aui:validator>
</aui:input>
<aui:input name="isActive" label="Active" type="checkbox" checked="true">
</aui:input>
</aui:column>
<aui:select id="Categroy_List" name="Categroy_List" onChange="return reload()">
<aui:option value="null" selected="selected">--select--</aui:option>
<%
List<Category_Master> cm=Category_MasterLocalServiceUtil.getCategory_Masters(-1,-1);
if(!cm.isEmpty()){
Category_Master scm=cm.get(cm.size()-1);
long cid=scm.getCatId();

if(request.getAttribute("result")==null){
List<Keyword_Master> km=Keyword_MasterLocalServiceUtil.getByCatId(cid);
for(Keyword_Master k:km)
{
	System.out.println(k.getKeywordName());
}
}else{
	System.out.println("hiihihihi");
}
for(Category_Master c:cm)
{
%>
<aui:option value="<%=c.getCatId() %>"><%=c.getCatName() %></aui:option>
<%}} %>
</aui:select>
</aui:layout>
<aui:button type="submit" value="ADD" cssClass="submitbtn"></aui:button>
</aui:form>
<aui:script>
function reload()
{



}
</aui:script>

</body>
</html>